package org.example.baseinfo.api;

import org.example.baseinfo.common.page.HxPage;
import org.example.baseinfo.common.page.HxPageRequest;
import org.example.baseinfo.common.vo.BaseResponse;
import org.example.baseinfo.pojo.vo.school.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;


@Api(tags = "学校API")
@RequestMapping("/school")
public interface SchoolApi {

    @ApiOperation(value = "新增学校")
    @PostMapping(value = "/save")
    BaseResponse<String> save(SaveSchoolReqVO param);

    @ApiOperation(value = "修改学校")
    @PostMapping(value = "/update")
    BaseResponse<String> update(UpdateSchoolReqVO param) throws Exception;

    @ApiOperation(value = "学校详情查询")
    @PostMapping(value = "/query")
    BaseResponse<SchoolVO> query(QuerySchoolReqVO param);

    @ApiOperation(value = "查询学校列表", notes = "无条件则全部查询")
    @PostMapping(value = "/list")
    BaseResponse<List<SchoolVO>> queryList(QuerySchoolListReqVO param);

    @ApiOperation(value = "分页查询学校列表", notes = "无条件则全部查询")
    @PostMapping(value = "/page")
    BaseResponse<HxPage<SchoolVO>> queryPage(HxPageRequest<QuerySchoolListReqVO> param);

}
